<nz-modal [(nzVisible)]="isVisible"
          [nzWidth]="880" nzTitle="批量生产设备码"
          (nzOnCancel)="handleCancel()"
          (nzOnOk)="handleOk()"
          [nzOkLoading]="isOkLoading"
          [nzFooter]="null"
>
  <nz-spin [nzSpinning]="isSpinning">
    <div class="content">
      设备码规则：年(1949) + 月(10) + 日(01) + 0001 ~ 9999，如：194910010001<br/>
    </div>
    <div class="content">
      Tip：今天还可以生产  <label class="residue">{{newDevice?.newDeviceNumber}}</label>  个，范围是  {{newDevice?.deviceNoYMD}}{{newDevice?.beginNo}} ~ {{newDevice?.deviceNoYMD}}{{newDevice?.endNo}}
    </div>

    <form nz-form [formGroup]="formModel" class="deviceEditForm">
      <nz-form-item>
        <nz-form-label [nzSpan]="5" nzRequired>新设备数量</nz-form-label>
        <nz-form-control [nzSpan]="15" nzErrorTip="请输入新设备数量，今天还可以生产{{newDevice?.newDeviceNumber}}个新设备号！">
          <nz-input-number [nzMin]="1" [nzMax]="9999" formControlName="newDeviceNumber" [nzSize]="'large'"  [nzDisabled]="newDevice?.newDeviceNumber > 0 ? false : true"></nz-input-number>
        </nz-form-control>
      </nz-form-item>

      <div class="steps-action">
        <button nz-button nzType="primary" (click)="handleOk()">
          <span>确&nbsp;&nbsp;&nbsp;&nbsp;认</span>
        </button>
      </div>
    </form>

  </nz-spin>
</nz-modal>
